//
//  AttributedLabel.m
//  XinJiangMall
//
//  Created by Tzyang on 2018/4/8.
//  Copyright © 2018年 Tzyang. All rights reserved.
//

#import "AttributedLabel.h"

@implementation AttributedLabel

- (void)setAttributedColor:(UIColor *)attributedColor{
    
    _attributedColor = attributedColor;
}

- (void)setAttributedRange:(NSRange)attributedRange{
    
    _attributedRange = attributedRange;
    
    NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:self.text];
    [str addAttribute:NSForegroundColorAttributeName value:_attributedColor range:attributedRange];
    self.attributedText = str;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
